<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>

<html>
<head>
<title><tiles:insertAttribute name="title" ignore="true" /></title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<!-- EXT CSS -->
<link rel="stylesheet" type="text/css" href="<s:url value="/js/ext/resources/css/ext-all.css" />" />
<!-- Application -->
<link rel="stylesheet" type="text/css" href="<s:url value="/css/default/web.css" />" />
<!-- DisplayTag -->
<link rel="stylesheet" type="text/css" href="<s:url value="/css/default/displaytag.css" />" />
<!-- DD Smooth Menu -->
<link rel="stylesheet" type="text/css" href="<s:url value="/css/default/ddsmoothmenu.css" />" />

<script type="text/javascript" src="<s:url value="/dwr/engine.js" includeParams="none" />"></script>
<script type="text/javascript" src="<s:url value="/dwr/util.js" includeParams="none" />"></script>

<s:head />
<sj:head jqueryui="true" jquerytheme="blitzer" compressed="false" ajaxcache="false" loadAtOnce="true"/>
<!-- DWR Session Timeout Handler -->
<script type='text/javascript'>
var applicationBase = '<s:url value="/" includeParams="none" />';

dwr.engine.setTextHtmlHandler(function() {
	window.alert("Your session has expired, please login again.");
});
</script>
<script type='text/javascript' src='<s:url value="/dwr/interface/HierarchyProxy.js" includeParams="none" />'></script>
<script type='text/javascript' src='<s:url value="/dwr/interface/IdentityProxy.js" includeParams="none" />'></script>

<script type="text/javascript" src="<s:url value="/js/ddsmoothmenu.js" includeParams="none" />"></script>

<!-- EXT Framework -->
<script type="text/javascript" src="<s:url value="/js/ext/bootstrap.js" />"></script>
<script type="text/javascript">
$(document).ready(function () {
	/*
	 * Usability enhancement, find first focusable input element.
	 */
	var input = $("input:visible").get(0);
	var select = $("select:visible").get(0);

	if (input && select) {
		if ($(input).position().top < $(select).position().top ) {
			input.focus();
			
		} else {
			select.focus();
			
		}
		
	} else if (input) {
		input.focus();
		
	} else if (select) {
		select.focus();
		
	}
});
</script>
</head>
<body>
<tiles:insertAttribute name="header" />
<tiles:insertAttribute name="menu" />
<div id="container">
<h2><tiles:insertAttribute name="title" ignore="true" /></h2>
<s:actionmessage theme="simple" />
<tiles:insertAttribute name="body" />
</div>
</body>
</html>